package com.javatom.notes.feign.service;

import com.javatom.notes.common.User;
import com.javatom.notes.common.model.BaseResponse;
import com.javatom.notes.feign.service.fallback.UserFeignHystrixFallBack;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;

import java.util.List;

/**
 * Feign和Hystrix结合一起使用
 */
@FeignClient(name = "apiProvide",fallback = UserFeignHystrixFallBack.class)
public interface UserFeignHystrixFallBackOperatService {

    @RequestMapping(method = RequestMethod.GET, value = "/user/list")
    BaseResponse<List<User>> getList();
}
